package com.apkcore.core.net

import okhttp3.Interceptor

object RetrofitService {
    private val provider = RetrofitProvider()

    fun initialize(baseUrl: String, interceptors: List<Interceptor> = emptyList(),
                   connectTimeout:Long= RetrofitProvider.CONNECTION_TIME_OUT, readTimeout:Long= RetrofitProvider.READ_TIME_OUT
    ) {
        provider.initialize(baseUrl, interceptors,connectTimeout,readTimeout)
    }

    fun <T> getApiService(serviceClass: Class<T>): T {
        return provider.createService(serviceClass)
    }
}
